<?php
//  Author: gangbo <daigangbo@126.com>

/**
 * 配置管理
 */
class UserAction extends AdminAction {

    public function login() {
        dump($_COOKIE);
        dump(($_COOKIE['user']));
        dump(CS('user'));
        dump($_SESSION);
        $this->display();
    }
    public function checkLogin() {
        $condition = array(
                'user_login'=>$_POST['username'],
                'user_pass'=>md5($_POST['password'])
        );
        $User = M('Users');
        $loginUser = $User->where($condition)->find();
        if(!empty($loginUser)) {
            CS('user',$loginUser);
            //$this->success('登陆成功');
        }else {
            $this->error('用户名或密码错误');
        }
     }
}

?>
